<!-- 商品分配页面 -->
<div id="itemAllotPage" v-cloak>

    <!-- 报价商品 start -->
    <el-dialog :title="itemName + '（工厂报价列表）'" :visible.sync="quoteItemAllotPageVisible" @closed="closeItemAllotPage" fullscreen>
        <el-form :inline="true" class="demo-form-inline" size="small">
            <el-form-item label="工厂地址：">
                <el-input v-model.trim="q.factoryAddr"></el-input>
            </el-form-item>
            <el-form-item label="工厂名称：">
                <el-input v-model.trim="q.factoryName"></el-input>
            </el-form-item>
            <el-form-item>
                <el-button type="primary" @click="queryFactoryQuote">查询</el-button>
            </el-form-item>
        </el-form>

        <el-table tooltip-effect="dark" :data="factoryQuoteInfosQuery" size="mini">
            <el-table-column type="index" label="序号"></el-table-column>
            <el-table-column prop="factoryInfoVO.factoryName" label="印刷厂"></el-table-column>
            <el-table-column label="联系方式及地址">
                <template slot-scope="scope">
                    姓名：{{scope.row.factoryInfoVO.contacts}}
                    <br/>
                    联系方式：{{scope.row.factoryInfoVO.contactWay}}
                    <br/>
                    联系地址：{{scope.row.factoryInfoVO.address}}
                </template>
            </el-table-column>
            <el-table-column  prop="factoryInfoVO.qq" label="QQ"></el-table-column>
            <el-table-column  label="配送范围">
                <template slot-scope="scope">
                    全国
                </template>
            </el-table-column>
            <el-table-column  label="推荐工序">
                <template slot-scope="scope">
                    名片，拼版不干胶
                </template>
            </el-table-column>
            <el-table-column  prop="totalPrice" label="价格">
                <template slot-scope="scope">
                    <span style="color: red">￥{{scope.row.totalPrice}}</span>
                </template>
            </el-table-column>
            <el-table-column  prop="csRemark" label="备注">
                <template slot-scope="scope">
                    <el-input size="small" v-model.trim="scope.row.csRemark" placeholder="请填写备注信息"></el-input>
                </template>
            </el-table-column>
            <el-table-column label="操作" width="100">
                <template slot-scope="scope">
                    <el-button type="text" size="small" @click="quoteItemAllotSave(scope.row)">分配</el-button>
                </template>
            </el-table-column>
        </el-table>

    </el-dialog>
    <!-- 报价商品 end -->

    <!-- 商品分配至自营门店(标品、报价商品) start    -->
    <el-dialog :title="itemName + '（工厂报价列表）'" :visible.sync="itemAllotPageVisible" @closed="closeItemAllotPage" fullscreen>
        <el-table tooltip-effect="dark" :data="factoryInfosQuery" size="mini">
            <el-table-column type="index" label="序号"></el-table-column>
            <el-table-column prop="merchantName" label="印刷厂"></el-table-column>
            <el-table-column prop="mobile" label="联系方式"></el-table-column>
            <el-table-column prop="qq" label="QQ"></el-table-column>
            <el-table-column label="配送范围">
                <template slot-scope="scope">
                    全国
                </template>
            </el-table-column>
            <el-table-column  label="推荐工序">
                <template slot-scope="scope">
                    名片，拼版不干胶
                </template>
            </el-table-column>
            <el-table-column  prop="totalPrice" label="价格">
                <template slot-scope="scope">
                    <span style="color: red">￥{{scope.row.totalPrice}}</span>
                </template>
            </el-table-column>

            <el-table-column  prop="csRemark" label="备注">
                <template slot-scope="scope">
                    <el-input size="small" v-model.trim="scope.row.csRemark" placeholder="请填写备注信息"></el-input>
                </template>
            </el-table-column>

            <el-table-column label="操作" width="100">
                <template slot-scope="scope">
                    <el-button type="text" size="small" @click="itemAllotSave(scope.row)">分配</el-button>
                </template>
            </el-table-column>
        </el-table>
    </el-dialog>
    <!-- 商品分配至自营门店 end -->

    <!-- 标品（分配至第三方） start    -->
    <el-dialog :title="itemName + '（工厂报价列表）'" :visible.sync="quoteStandardItemAllotPageVisible" @closed="closeItemAllotPage" fullscreen>
        <el-form :inline="true" class="demo-form-inline" size="small">
            <el-form-item label="工厂名称：">
                <el-input v-model.trim="q.factoryName"></el-input>
            </el-form-item>
            <el-form-item>
                <el-button type="primary" @click="queryFactoryStandard">查询</el-button>
            </el-form-item>
        </el-form>
        <el-table tooltip-effect="dark" :data="factoryStandardInfosQuery" size="mini">
            <el-table-column type="index" label="序号"></el-table-column>
            <el-table-column prop="sellerDetail.merchantName" label="印刷厂"></el-table-column>
            <el-table-column prop="sellerDetail.mobile" label="联系方式"></el-table-column>
            <el-table-column prop="sellerDetail.qq" label="QQ"></el-table-column>
            <el-table-column label="配送范围">
                <template slot-scope="scope">
                    全国
                </template>
            </el-table-column>
            <el-table-column  label="推荐工序">
                <template slot-scope="scope">
                    名片，拼版不干胶
                </template>
            </el-table-column>
            <el-table-column label="价格">
                <template slot-scope="scope">
                    <span style="color: red">￥{{scope.row.basePriceDetail.totalPrice}}</span>
                </template>
            </el-table-column>
            <el-table-column  prop="csRemark" label="备注">
                <template slot-scope="scope">
                    <el-input size="small" v-model.trim="scope.row.csRemark" placeholder="请填写备注信息"></el-input>
                </template>
            </el-table-column>
            <el-table-column label="操作" width="100">
                <template slot-scope="scope">
                    <el-button type="text" size="small" @click="itemAllotSave(scope.row)">分配</el-button>
                </template>
            </el-table-column>
        </el-table>
    </el-dialog>
    <!-- 标品 end -->

</div>

<script src="${request.contextPath}/statics/js/modules/order/itemAllot.js?_${.now?long}"></script>
